# import requests
#
# import subprocess
#
# mitmproxy_port = 9789
#
# from mitmproxy import options
# from mitmproxy.tools import main
#
# # 创建 mitmproxy 的选项对象
# mitmproxy_options = options.Options(listen_host='0.0.0.0', listen_port=mitmproxy_port)
#
# # 启动 mitmproxy
# main.mitmdump(['-p', f'{mitmproxy_port}'])
#
#
# proxies = {
#     'http': f'http://127.0.0.1:{mitmproxy_port}',
#     'https': f'https://127.0.0.1:{mitmproxy_port}'
# }
#
# headers = {
#     'sec-ch-ua': '"Not A(Brand";v="99", "Google Chrome";v="121", "Chromium";v="121"',
#     'accept': 'application/json, text/javascript, */*; q=0.01',
#     'content-type': 'application/json;',
#     'sec-ch-ua-mobile': '?0',
#     'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36',
#     'sec-ch-ua-platform': '"macOS"',
#     'origin': 'https://www.eddidyzt.com',
#     'sec-fetch-site': 'cross-site',
#     'sec-fetch-mode': 'cors',
#     'sec-fetch-dest': 'empty',
#     'referer': 'https://www.eddidyzt.com/',
#     'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8',
# }
#
# json_data = {
#     'apiType': 'news-hkus',
# }
#
# response = requests.post('https://info.eddidapp.com/open/info/news/fetch', headers=headers, json=json_data, proxies=proxies, verify=False)
#
# # Note: json_data will not be serialized by requests
# # exactly as it was in the original request.
# #data = '{"apiType":"news-hkus"}'
# #response = requests.post('https://info.eddidapp.com/open/info/news/fetch', headers=headers, data=data)
#
# print(response.text)
